package com.ywjg.serviceimp;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.ywjg.dao.DiyMessageDao;
import com.ywjg.model.DiyMessage;
import com.ywjg.service.IDiyMessageService;
@Service
public class DiyMessageService implements IDiyMessageService {
    @Resource
	DiyMessageDao diyMessageDao;
	
	
	/* (non-Javadoc)
	 * @see com.ywjg.serviceimp.IDiyMessageService#publishDiyMessage(com.ywjg.model.DiyMessage)
	 */
	public DiyMessage publishDiyMessage(DiyMessage diyMessage) {
		return diyMessageDao.save(diyMessage);
		
	}

	/* (non-Javadoc)
	 * @see com.ywjg.serviceimp.IDiyMessageService#getOwerDiyMessage(java.lang.Integer)
	 */
	public List<DiyMessage> getOwerDiyMessage(Integer ower_id) {
		return diyMessageDao.findByappUserId(ower_id);
		
	}

	/* (non-Javadoc)
	 * @see com.ywjg.serviceimp.IDiyMessageService#getDiyMessageIsRecive(java.lang.Integer)
	 */
	public void getDiyMessageIsRecive(Integer ower_id) {
		// TODO Auto-generated method stub
		
	}

	/* (non-Javadoc)
	 * @see com.ywjg.serviceimp.IDiyMessageService#reciveDiyMessage(com.ywjg.model.DiyMessage)
	 */
	public void reciveDiyMessage(DiyMessage diyMessage) {
		// TODO Auto-generated method stub
		
	}
	
	/* (non-Javadoc)
	 * @see com.ywjg.serviceimp.IDiyMessageService#getAll()
	 */
	public List<DiyMessage> getAll(){
		List<DiyMessage> findAll = diyMessageDao.findAll();
		return findAll;
		
		
		
	}

	
}